/*
 * @Descripttion: 
 * @version: 
 * @Author: kk
 * @Date: 2020-10-25 18:50:39
 * @LastEditors: kk
 * @LastEditTime: 2020-10-28 15:16:22
 */
import request from '@/utils/request'

export default{
    //获取权限列表
    getMenuList(){
        return request({
            url: '/acl/menu/getMenuList',
            method: 'get'
        })
    },
    //添加权限
    addMenu(data){
        return request({
            url: '/acl/menu/addMenu',
            method: 'post',
            data
        })
    },

    //删除权限
    removeMenu(id){
        return request({
            url: `/acl/menu/removeMenu/${id}`,
            method: 'post',
        })
    },

    //更新权限
    updateMenu(data){
        return request({
            url: '/acl/menu/updateMenu',
            method: 'post',
            data
        })
    },
    //获取角色权限
    getRoleMenu(roleId){
        return request({
            url: `/acl/menu/getRoleMenu/${roleId}`,
            method: 'get',
        })
    },
    //为角色分配权限
    assignMenuToRole(roleId,data){
        return request({
            url: `/acl/menu/toAssignMenu/${roleId}`,
            method: 'post',
            data
        })
    }
}